home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / part14 < prev    next >
Encoding:
Internet Message Format  |  1989-07-06  |  38.7 KB

  1. Path: uunet!husc6!cmcl2!rutgers!mit-eddie!uw-beaver!tektronix!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v06i096:  conquer4 - middle earth multi-player game (V4), Part14/14
  5. Message-ID: <4154@tekred.CNA.TEK.COM>
  6. Date: 24 Jun 89 16:38:03 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1276
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: adb@bu-it.bu.edu (Adam Bryant)
  12. Posting-number: Volume 6, Issue 96
  13. Archive-name: conquer4/Part14
  14. Superseeds: conquer3; Volume 4, Issue 42-49
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 14 (of 14)."
  25. # Contents:  Makefile cexecute.c man.pag sort.c txt3
  26. # Wrapped by billr@saab on Thu Jun 15 15:20:24 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'Makefile'\"
  30. else
  31. echo shar: Extracting \"'Makefile'\" \(7763 characters\)
  32. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  33. X#    conquer: Copyright (c) 1988 by Edward M Barlow
  34. X#
  35. X#    BY CHANGING THIS FILE, YOU AGREE TO ABIDE BY THE LIMITATIONS STATED IN
  36. X#    THE LIMITED USE CONTRACT CONTAINED IN THE FILE "header.h"
  37. X#
  38. XMAKE    = /bin/make
  39. XCC    = /bin/cc
  40. XRM    = /bin/rm -f
  41. X
  42. X#    LN must be "ln -s" if source, data, and default span disks
  43. XLN    = ln
  44. XCP    = cp
  45. XNULL    = 2>/dev/null
  46. X
  47. X#    This should be installed by whomever you want to own the game.
  48. X#    I recommend "games" or "root".
  49. X
  50. X#if the final link does not compile change to the line below
  51. X#LIBRARIES = -lcurses -ltermcap
  52. XLIBRARIES = -lcurses
  53. X
  54. X#    this is the name of the user executable
  55. X#    the user executable contains commands for the games players
  56. XGAME = conquer
  57. X#    this is the name of the administrative executable
  58. X#    the administrative executable contains commands for the game super user
  59. XADMIN = conqrun
  60. X
  61. X#    This directory is where the executables will be stored
  62. X#    This would be the equivalent of /usr/games
  63. XEXEDIR = /c28/smile/game/runv
  64. X
  65. X#    GAME IDENTIFICATION
  66. X#    GAMEID is the game identifier
  67. X#    DATA is the directory where an individual Conquer game data will be
  68. X#    stored.  It is the directory you use in the -d option of the game.
  69. X#    "make new_game" will build a world in that directory.  The current
  70. X#    game will be automatically executed upon login (no need for -d)
  71. X#    but if other games are compiled, you need to use -d (ie. the
  72. X#    game automatically looks at the DATA directory it was compiled with.
  73. XGAMEID = 1
  74. XDATA = $(EXEDIR)/lib$(GAMEID)
  75. X
  76. X#    The following CFLAGS should be set by a normal user
  77. XCFLAGS  = -DDEFAULTDIR=\"$(DATA)\" -O -s -DEXEDIR=\"$(EXEDIR)\"
  78. X#    The following CFLAGS should be used if you wish to debug the game
  79. X#CFLAGS  = -DDEFAULTDIR=\"$(DATA)\" -DDEBUG -g -DEXEDIR=\"$(EXEDIR)\"
  80. X
  81. X# AFILS are files needed for game updating...
  82. XAFILS = combat.c cexecute.c io.c admin.c makeworl.c  navy.c spew.c \
  83. Xnewlogin.c update.c magic.c npc.c misc.c randeven.c data.c trade.c check.c
  84. XAOBJS = combat.o cexecuteA.o ioA.o admin.o makeworl.o  navyA.o \
  85. Xnewlogin.o update.o magicA.o npc.o miscA.o randeven.o dataA.o \
  86. XtradeA.o check.o $(GETOPT) spew.o
  87. X
  88. X# GFILS are files needed to run a normal interactive game
  89. XGFILS = commands.c cexecute.c forms.c io.c main.c move.c navy.c \
  90. Xmagic.c misc.c reports.c data.c display.c extcmds.c trade.c check.c
  91. XGOBJS = commands.o cexecute.o forms.o io.o main.o move.o navy.o \
  92. Xmagic.o misc.o reports.o data.o display.o extcmds.o trade.o check.o $(GETOPT)
  93. X
  94. X#txt[0-5] are input help files.  help[0-5] are output
  95. XHELP0=txt0
  96. XHELP1=txt1
  97. XHELP2=txt2
  98. XHELP3=txt3
  99. XHELP4=txt4
  100. XHELP5=txt5
  101. XHELPOUT=help
  102. X
  103. XHEADERS=header.h data.h newlogin.h patchlevel.h
  104. XHELPFILES= $(HELP0) $(HELP1) $(HELP2) $(HELP3) $(HELP4) $(HELP5)
  105. XALLFILS=$(HEADERS) $(AFILS) commands.c forms.c main.c move.c \
  106. Xreports.c display.c extcmds.c $(HELPFILES) nations Makefile README \
  107. Xrun man.pag notes.v4 rules sort.c newhelp.c
  108. X
  109. Xall:    $(ADMIN) $(GAME) helpfile conqsort
  110. X    @echo YAY! make new_game to set up permissions, zero appropriate
  111. X    @echo initial files, move $(GAME) and $(ADMIN) to
  112. X    @echo $(EXEDIR), and set up the world.
  113. X    @echo If a game is in progress, make install will just move $(GAME)
  114. X    @echo and $(ADMIN) to $(EXEDIR).
  115. X    @echo
  116. X
  117. X$(ADMIN):    $(AOBJS)
  118. X    @echo phew...
  119. X    @echo if the next command does not compile, you might also need -ltermcap
  120. X    @echo === compiling administrative functions
  121. X    $(CC) -p -o $(ADMIN) $(AOBJS) $(LIBRARIES)
  122. X
  123. X$(GAME):    $(GOBJS)
  124. X    @echo phew...
  125. X    @echo if the next command does not compile, you might also need -ltermcap
  126. X    @echo === compiling user interface
  127. X    $(CC) -O -o $(GAME) $(GOBJS) $(LIBRARIES)
  128. X
  129. Xconqsort:
  130. X    $(CC) -O -oconqsort sort.c
  131. X
  132. Xclobber:
  133. X    $(RM) *.o core newhelp sed.1 sed.2 lint* \
  134. X        conquer.doc $(GAME) $(ADMIN) $(HELPOUT)[0-5] 2>/dev/null
  135. X
  136. Xclean:
  137. X    $(RM) *.o core conquer.doc sed.1 sed.2 newhelp $(HELPOUT)[0-5] 2>/dev/null
  138. X
  139. Xinstall:  all
  140. X    -$(LN) $(GAME) $(EXEDIR)/$(GAME) $(NULL)
  141. X    -$(LN) $(ADMIN) $(EXEDIR)/$(ADMIN) $(NULL)
  142. X    -$(LN) conqsort $(EXEDIR)/conqsort $(NULL)
  143. X    chmod 4755 $(EXEDIR)/$(GAME)
  144. X    chmod 4750 $(EXEDIR)/$(ADMIN)
  145. X    $(CP) conqsort nations rules $(HELPOUT)? $(DATA) $(NULL)
  146. X
  147. Xnew_game:  all
  148. X    @echo Installing new game in $(EXEDIR)
  149. X    -mkdir $(EXEDIR) 2>/dev/null
  150. X    chmod 755 $(EXEDIR)
  151. X    -$(LN) $(GAME) $(EXEDIR)/$(GAME) $(NULL)
  152. X    -$(LN) $(ADMIN) $(EXEDIR)/$(ADMIN) $(NULL)
  153. X    chmod 4755 $(EXEDIR)/$(GAME)
  154. X    chmod 4750 $(EXEDIR)/$(ADMIN)
  155. X    chmod 0700 run
  156. X    @echo Copying data to library $(DATA)
  157. X    -mkdir $(DATA) 2>/dev/null
  158. X    chmod 751 $(DATA)
  159. X    chmod 0600 nations
  160. X    $(CP) nations rules $(HELPOUT)? $(DATA) $(NULL)
  161. X    @echo now making the world
  162. X    $(EXEDIR)/$(ADMIN) -d$(DATA) -m
  163. X    $(EXEDIR)/$(ADMIN) -d$(DATA) -a
  164. X
  165. Xhelpfile:    $(HELPOUT)0
  166. X    @echo Helpfiles built
  167. X
  168. X$(HELPOUT)0:    newhelp $(HELPFILES)
  169. X    @echo Building the help files
  170. X    newhelp
  171. X    cat $(HELP0) | sed -f sed.1 > $(HELPOUT)0
  172. X    cat $(HELP1) | sed -f sed.1 | sed -f sed.2 > $(HELPOUT)1
  173. X    cat $(HELP2) | sed -f sed.1 > $(HELPOUT)2
  174. X    cat $(HELP3) | sed -f sed.1 | sed -f sed.2 > $(HELPOUT)3
  175. X    cat $(HELP4) | sed -f sed.1 > $(HELPOUT)4
  176. X    cat $(HELP5) | sed -f sed.1 > $(HELPOUT)5
  177. X    chmod 0644 $(HELPOUT)[0-5]
  178. X    -$(RM) sed.1 sed.2
  179. X
  180. Xlint:
  181. X    lint -DDEFAULTDIR=\"$(DATA)\" -DEXEDIR=\"$(EXEDIR)\" -DCONQUER $(GFILS) $(LIBRARIES)> lintg
  182. X    lint -DDEFAULTDIR=\"$(DATA)\" -DEXEDIR=\"$(EXEDIR)\" -DADMIN $(AFILS) $(LIBRARIES) > linta
  183. X
  184. Xdocs:    helpfile conquer.doc
  185. X
  186. Xconquer.doc:    $(HELPOUT)0 $(HELPOUT)1 $(HELPOUT)2 $(HELPOUT)3 $(HELPOUT)4 $(HELPOUT)5
  187. X    cat $(HELPOUT)?|sed -e "s/^DONE/ /g"|sed -e "s/^END//g" > conquer.doc
  188. X
  189. Xshar:
  190. X    echo " lines   words chars   FILENAME" > MANIFEST
  191. X    wc $(ALLFILS) >> MANIFEST
  192. X    $(HOME)/src/xshar/xshar -D -c -l64 -oshar -v $(ALLFILS)
  193. X
  194. Xcombat.o:    data.h header.h combat.c
  195. X    $(CC) $(CFLAGS) -DADMIN -c combat.c
  196. Xcexecute.o:    data.h header.h cexecute.c
  197. X    $(CC) $(CFLAGS) -DCONQUER -c cexecute.c
  198. Xio.o:    data.h header.h  io.c
  199. X    $(CC) $(CFLAGS) -DCONQUER -c io.c
  200. XcexecuteA.o:    data.h header.h cexecute.c
  201. X    $(CC) $(CFLAGS) -DADMIN -c cexecute.c
  202. X    mv cexecute.o cexecuteA.o
  203. XioA.o:    data.h header.h  io.c
  204. X    $(CC) $(CFLAGS) -DADMIN -c io.c
  205. X    mv io.o ioA.o
  206. Xadmin.o:    data.h header.h admin.c
  207. X    $(CC) $(CFLAGS) -DADMIN -c admin.c
  208. Xmakeworl.o:    data.h header.h makeworl.c
  209. X    $(CC) $(CFLAGS) -DADMIN -c makeworl.c
  210. Xnewlogin.o:    data.h header.h newlogin.h newlogin.c
  211. X    $(CC) $(CFLAGS) -DADMIN -c newlogin.c
  212. Xupdate.o:    data.h header.h update.c
  213. X    $(CC) $(CFLAGS) -DADMIN -c update.c
  214. Xmagic.o:    data.h header.h magic.c
  215. X    $(CC) $(CFLAGS) -DCONQUER -c magic.c
  216. XmagicA.o:    data.h header.h magic.c
  217. X    $(CC) $(CFLAGS) -DADMIN -c magic.c
  218. X    mv magic.o magicA.o
  219. Xnpc.o:    data.h header.h npc.c
  220. X    $(CC) $(CFLAGS) -DADMIN -c npc.c
  221. Xmisc.o:    data.h header.h misc.c
  222. X    $(CC) $(CFLAGS) -DCONQUER -c misc.c
  223. XmiscA.o:    data.h header.h misc.c
  224. X    $(CC) $(CFLAGS) -DADMIN -c misc.c
  225. X    mv misc.o miscA.o
  226. Xrandeven.o:    data.h header.h randeven.c
  227. X    $(CC) $(CFLAGS) -DADMIN -c randeven.c
  228. Xdata.o:    data.h header.h data.c
  229. X    $(CC) $(CFLAGS) -DCONQUER -c data.c
  230. XdataA.o:    data.h header.h data.c
  231. X    $(CC) $(CFLAGS) -DADMIN -c data.c
  232. X    mv data.o dataA.o
  233. Xdisplay.o:    data.h header.h display.c
  234. X    $(CC) $(CFLAGS) -DCONQUER -c display.c
  235. Xreports.o:    data.h header.h reports.c
  236. X    $(CC) $(CFLAGS) -DCONQUER -c reports.c
  237. Xmove.o:    data.h header.h move.c
  238. X    $(CC) $(CFLAGS) -DCONQUER -c move.c
  239. Xmain.o:    data.h header.h main.c
  240. X    $(CC) $(CFLAGS) -DCONQUER -c main.c
  241. Xforms.o:    data.h header.h forms.c
  242. X    $(CC) $(CFLAGS) -DCONQUER -c forms.c
  243. Xcommands.o:    data.h header.h commands.c
  244. X    $(CC) $(CFLAGS) -DCONQUER -c commands.c
  245. Xcheck.o:    data.h header.h check.c
  246. X    $(CC) $(CFLAGS) -c check.c
  247. Xtrade.o:    data.h header.h trade.c
  248. X    $(CC) $(CFLAGS) -DCONQUER -c trade.c
  249. XtradeA.o:    data.h header.h trade.c
  250. X    $(CC) $(CFLAGS) -DADMIN -c trade.c
  251. X    mv trade.o tradeA.o
  252. XnavyA.o:    data.h header.h navy.c
  253. X    $(CC) $(CFLAGS) -DADMIN -c navy.c
  254. X    mv navy.o navyA.o
  255. Xnavy.o:    data.h header.h trade.c
  256. X    $(CC) $(CFLAGS) -DCONQUER -c navy.c
  257. Xnewhelp:    data.o header.h data.h newhelp.c
  258. X    @echo Compiling the help program
  259. X    $(CC) $(CFLAGS) newhelp.c data.o -o newhelp
  260. END_OF_FILE
  261. if test 7763 -ne `wc -c <'Makefile'`; then
  262.     echo shar: \"'Makefile'\" unpacked with wrong size!
  263. fi
  264. # end of 'Makefile'
  265. fi
  266. if test -f 'cexecute.c' -a "${1}" != "-c" ; then 
  267.   echo shar: Will not clobber existing file \"'cexecute.c'\"
  268. else
  269. echo shar: Extracting \"'cexecute.c'\" \(7679 characters\)
  270. sed "s/^X//" >'cexecute.c' <<'END_OF_FILE'
  271. X/*conquer : Copyright (c) 1988 by Ed Barlow.
  272. X *  I spent a long time writing this code & I hope that you respect this.
  273. X *  I give permission to alter the code, but not to copy or redistribute
  274. X *  it without my explicit permission.  If you alter the code,
  275. X *  please document changes and send me a copy, so all can have it.
  276. X *  This code, to the best of my knowledge works well,  but it is my first
  277. X *  'C' program and should be treated as such.  I disclaim any
  278. X *  responsibility for the codes actions (use at your own risk).  I guess
  279. X *  I am saying "Happy gaming", and am trying not to get sued in the process.
  280. X *                                                Ed
  281. X */
  282. X
  283. X/*EXECUTE THE PROGRAM*/
  284. X#include "header.h"
  285. X#include "data.h"
  286. Xextern long startgold;
  287. Xextern short country;
  288. Xextern FILE *fexe;
  289. Xextern char fison[];
  290. X
  291. X#ifdef CONQUER
  292. Xextern int roads_this_turn;
  293. Xextern int terror_adj;
  294. X#endif
  295. X
  296. Xint
  297. Xexecute(isupdate)
  298. Xint    isupdate;    /* 0 if not update, 1 if update */
  299. X{
  300. X    FILE *fp, *fopen();
  301. X    int cmd,savectry;
  302. X    char comment[20];
  303. X    char temp[10];
  304. X    long longvar,long2var;
  305. X    int armynum;
  306. X    short int x,y;
  307. X    int execed=0;
  308. X    int done=FALSE;
  309. X    char line[80];
  310. X
  311. X    /* initialize startgold */
  312. X    if( isupdate==0) startgold = curntn->tgold;
  313. X
  314. X    /* initialize i_people */
  315. X    for(x=0;x<MAPX;x++)
  316. X        for(y=0;y<MAPY;y++)
  317. X            if(( sct[x][y].owner == country)&&
  318. X            ((sct[x][y].designation == DTOWN)
  319. X            ||( sct[x][y].designation == DCAPITOL)
  320. X            ||( sct[x][y].designation == DCITY)))
  321. X/* note: i_people is a short, so we must scale to allow for people >= 32K */
  322. X                sct[x][y].i_people = sct[x][y].people/256;
  323. X            else
  324. X                sct[x][y].i_people = 0;
  325. X
  326. X    /*open exefile file*/
  327. X    sprintf(line,"%s%d",exefile,country);
  328. X    if ((fp=fopen(line,"r"))==NULL) {
  329. X        /*THIS MEANS THAT THE NATION HAS NOT MOVED YET*/
  330. X        return(0);
  331. X    }
  332. X    savectry=country;
  333. X
  334. X    /*read in file*/
  335. X    if(fgets(line,80,fp)==NULL) done=TRUE;
  336. X    while(done==FALSE) {
  337. X        /*read and parse a new line*/
  338. X        /*CODE IF YOU USE LONG VAR IS L_*/
  339. X        if( line[0] == 'L' && line[1] == '_' ) {
  340. X            sscanf(line,"%s %d %hd %ld %ld %hd %s",
  341. X                temp,&cmd,&country,&longvar,&long2var,&y,comment);
  342. X        } else {
  343. X            sscanf(line,"%s %d %hd %d %hd %hd %s",
  344. X                temp,&cmd,&country,&armynum,&x,&y,comment);
  345. X        }
  346. X        curntn = &ntn[country];
  347. X
  348. X        execed=1;
  349. X        switch(cmd){
  350. X        case XASTAT:        /*Aadjstat*/
  351. X            if(x>0)  P_ASTAT=x;
  352. X            break;
  353. X        case XAMEN:    /*Aadjmen*/
  354. X            armynum= (int) longvar;
  355. X            P_ASOLD= (int) long2var;
  356. X            P_ATYPE= y;
  357. X            break;
  358. X        case XBRIBE:    /* nation has been bribed */
  359. X            if(!isupdate) break;    /* only work on update */
  360. X            ntn[y].tgold += longvar;
  361. X#ifdef DEBUG
  362. X    fprintf(stderr,"DEBUG: BRIBE BY %s of %s\n",ntn[country].name,ntn[y].name);
  363. X#endif DEBUG
  364. X            /* x represents chance of successful bribe */
  365. X            if(npctype(curntn->active)==npctype(ntn[y].active))
  366. X                x = 50;
  367. X            else if(isneutral(ntn[y].active)) x=30;
  368. X            else if(npctype(ntn[y].active)==ISOLATIONIST) x=15;
  369. X            else    x = 20;
  370. X            if(curntn->race==ntn[y].race) x+= 20;
  371. X            if( rand()%100 < x){
  372. X#ifdef DEBUG
  373. X    fprintf(stderr,"DEBUG: BRIBE IS SUCCESS\n");
  374. X#endif DEBUG
  375. X                ntn[y].dstatus[country]--;
  376. X            }
  377. X            break;
  378. X        case XALOC:    /*Aadjloc*/
  379. X            P_AXLOC=x;
  380. X            P_AYLOC=y;
  381. X            break;
  382. X        case MSETA:    /*Aadjmerc*/
  383. X#ifdef CONQUER
  384. X            mercgot+=armynum;
  385. X#endif
  386. X#ifdef ADMIN
  387. X            MERCMEN-=armynum;
  388. X#endif
  389. X            break;
  390. X        case MSETB:    /*Aadjdisb*/
  391. X            /* only allow raising of merc bonus */
  392. X            if (x>MERCATT)
  393. X            MERCATT=(MERCMEN*MERCATT+armynum*x)/(MERCMEN+armynum);
  394. X            if (y>MERCDEF)
  395. X            MERCDEF=(MERCMEN*MERCDEF+armynum*y)/(MERCMEN+armynum);
  396. X            MERCMEN+=armynum;
  397. X            break;
  398. X        case XNLOC: /*nadjloc*/
  399. X            curntn->nvy[armynum].xloc=x;
  400. X            curntn->nvy[armynum].yloc=y;
  401. X            break;
  402. X        case XNACREW:
  403. X            curntn->nvy[armynum].crew=x;
  404. X            curntn->nvy[armynum].armynum=y;
  405. X            break;
  406. X        case XNAMER: /*nadjmer*/
  407. X            curntn->nvy[armynum].merchant=x;
  408. X            break;
  409. X        case XNAWAR: /*nadjwar*/
  410. X            curntn->nvy[armynum].warships=x;
  411. X            break;
  412. X        case XNAGAL: /*nadjgal*/
  413. X            curntn->nvy[armynum].galleys=x;
  414. X            break;
  415. X        case XNAHOLD: /*nadjhld*/
  416. X            curntn->nvy[armynum].people=(unsigned char)y;
  417. X            curntn->nvy[armynum].armynum=(unsigned char)x;
  418. X            break;
  419. X        case XECNAME:    /*Nadjname*/
  420. X            strcpy(curntn->name,comment);
  421. X            break;
  422. X        case XECPAS:    /*Nadjpas*/
  423. X            strncpy(curntn->passwd,comment,PASSLTH);
  424. X            break;
  425. X        case NPOP:    /* set various nation attributes */
  426. X#ifdef CONQUER
  427. X            terror_adj++;
  428. X#endif CONQUER
  429. X            curntn->popularity = armynum;
  430. X            curntn->terror = x;
  431. X            curntn->reputation = y;
  432. X            break;
  433. X        case NTAX:    /* set nations tax rate */
  434. X            curntn->tax_rate = armynum;
  435. X            curntn->active = x;
  436. X            curntn->charity = y;
  437. X            break;
  438. X        case EDSPL:    /*Edecspl*/
  439. X            curntn->spellpts-=armynum;
  440. X            break;
  441. X        case XSADES:    /*Sadjdes*/
  442. X            if((sct[x][y].owner!=country)&&(country!=0)) {
  443. X                fprintf(stderr,"ERROR: <%s> redesignate sector %d,%d that is not owned\n",curntn->name,x,y);
  444. X                break;
  445. X            }
  446. X
  447. X            sct[x][y].designation=comment[0];
  448. X            if(sct[x][y].designation==DCAPITOL){
  449. X                curntn->capx=x;
  450. X                curntn->capy=y;
  451. X            }
  452. X#ifdef CONQUER
  453. X            if (sct[x][y].designation==DROAD)
  454. X                roads_this_turn++;
  455. X#endif
  456. X            break;
  457. X        case XSACIV:    /*Sadjciv*/
  458. X            /* if for some reason you dont own it, put people
  459. X            back into your capitol */
  460. X            if((sct[x][y].owner!=country)&&(country!=0)) {
  461. X                sct[curntn->capx][curntn->capy].people+=armynum;
  462. X                fprintf(stderr,"ERROR: <%s> told to put %d civilians in sector %d,%d not owned - placed in capitol\n",curntn->name,armynum,x,y);
  463. X                break;
  464. X            }
  465. X            sct[x][y].people=armynum;
  466. X            break;
  467. X        case XSIFORT:    /*Sincfort*/
  468. X            sct[x][y].fortress++;
  469. X            break;
  470. X        case XNAGOLD:    /*Nadjgold:*/
  471. X            curntn->tgold = longvar;
  472. X            break;
  473. X        case XAMOV:
  474. X            P_AMOVE=x;
  475. X            break;
  476. X        case XNMOV:
  477. X            curntn->nvy[armynum].smove=x;
  478. X            break;
  479. X        case XSAOWN:
  480. X            /* if not own it, and if people there, problem */
  481. X            if((sct[x][y].owner!=country)
  482. X            &&( country!=0)
  483. X            &&( sct[x][y].owner>0 )
  484. X            &&( sct[x][y].people>0 )
  485. X            &&( magic(country,SLAVER)==FALSE )
  486. X            &&( ntn[sct[x][y].owner].race!=curntn->race)){
  487. X                sct[ntn[sct[x][y].owner].capx][ntn[sct[x][y].owner].capy].people+= sct[x][y].people;
  488. X                sct[x][y].people=0;
  489. X                fprintf(stderr,"ERROR: <%s> taking sector %d %d but civilians exist of other race - puting them in their capitol\n",curntn->name,x,y);
  490. X            }
  491. X            if(curntn->popularity<MAXTGVAL) curntn->popularity++;
  492. X            sct[x][y].owner=country;
  493. X            break;
  494. X        case EDADJ:
  495. X            curntn->dstatus[armynum]=x;
  496. X            break;
  497. X        case XNARGOLD:
  498. X            curntn->jewels = longvar;
  499. X            break;
  500. X        case XNAMETAL:
  501. X            curntn->metals = longvar;
  502. X            break;
  503. X        case INCAPLUS:
  504. X            curntn->aplus++;
  505. X            break;
  506. X        case INCDPLUS:
  507. X            curntn->dplus++;
  508. X            break;
  509. X        case DESTRY:
  510. X            sct[ntn[armynum].capx][ntn[armynum].capy].owner=savectry;
  511. X            country=armynum;
  512. X            destroy(country);
  513. X            country=savectry;
  514. X            break;
  515. X        case CHG_MGK:
  516. X            curntn->powers|=long2var;
  517. X            if(curntn->powers!=longvar){
  518. X            printf("\nERROR ON MAGIC READ country=%d %ld != %ld (or of %ld)",country,longvar,curntn->powers,long2var);
  519. X            getchar();
  520. X            }
  521. X            exenewmgk(long2var);
  522. X            long2var=0;
  523. X            break;
  524. X        }
  525. X        if(fgets(line,80,fp)==NULL) done=TRUE;
  526. X    }
  527. X    fclose(fp);
  528. X    /*return 1 if it did something*/
  529. X    country=savectry;
  530. X    curntn = &ntn[country];
  531. X    if(execed==1) return(1);
  532. X    else return(0);
  533. X}
  534. X#ifdef CONQUER
  535. Xvoid
  536. Xhangup()
  537. X{
  538. X    if(country==0) writedata();
  539. X    else {
  540. X        fprintf(fexe,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n",
  541. X        XNAGOLD ,country,curntn->tgold,"null");
  542. X        fprintf(fexe,"L_NMETAL\t%d \t%d \t%ld \t0 \t0 \t%s\n",
  543. X        XNAMETAL ,country,curntn->metals,"null");
  544. X        fprintf(fexe,"L_NJWLS\t%d \t%d \t%ld \t0 \t0 \t%s\n",
  545. X        XNARGOLD ,country,curntn->jewels,"null");
  546. X    }
  547. X    /*close file*/
  548. X    fclose(fexe);
  549. X    /*send a message to God*/
  550. X    mailopen( 0 );
  551. X    fprintf(fm,"WARNING: Nation %s hungup on me.\n",curntn->name);
  552. X    mailclose();
  553. X
  554. X    /* remove the lock file */
  555. X    unlink(fison);
  556. X    /* exit program */
  557. X    exit(FAIL);
  558. X}
  559. X#endif CONQUER
  560. END_OF_FILE
  561. if test 7679 -ne `wc -c <'cexecute.c'`; then
  562.     echo shar: \"'cexecute.c'\" unpacked with wrong size!
  563. fi
  564. # end of 'cexecute.c'
  565. fi
  566. if test -f 'man.pag' -a "${1}" != "-c" ; then 
  567.   echo shar: Will not clobber existing file \"'man.pag'\"
  568. else
  569. echo shar: Extracting \"'man.pag'\" \(5174 characters\)
  570. sed "s/^X//" >'man.pag' <<'END_OF_FILE'
  571. X.TH CONQUER 6
  572. X.SH NAME
  573. Xconquer \- multiuser game of strategy
  574. X.SH SYNOPSIS
  575. X.B conquer
  576. X[-hs -nNAT -dDIR]
  577. X.sp
  578. X.B conqrun
  579. X[-maxp -dDIR ]
  580. X.SH DESCRIPTION
  581. X.I CONQUER
  582. Xis a multi player computer game designed to run under the UNIX
  583. Xoperating system.  In
  584. X.I CONQUER,
  585. Xeach player is the leader of a nation,
  586. Xcomposed of people (humans, orcs, elves, dwarves), recourses, and land.
  587. XRulers customize their nation at creation by chosing their race and by giving
  588. Xtheir nation special powers (magic, combat factor, location, speed...)
  589. Xand resources (civilians, troops, metal, gold...).  Play involves building,
  590. Xmoving, and controlling armies and navies, diplomacy with other players,
  591. Xand adjusting economic activity, which is primarily geared to the production
  592. Xof gold for your treasury.  Metal is needed, however to build ships & armies,
  593. Xand food is needed to prevent revolts and keep people alive.
  594. X.SH ON LINE HELP
  595. XFor detailed information, run conquer with the -h option (see below).
  596. X.SH GAME OPTIONS
  597. X.B conquer
  598. X[-hs -nNAT -dDIR]
  599. X.IP \-h
  600. Xprint this help text
  601. X.IP "\-n NTN"
  602. Xrun as nation NTN
  603. X.IP "\-d DIR"
  604. XRun on data in directory DIR.  Each game has its own data directory.  The
  605. Xdefault is set up at compile time and should only be used if only one game
  606. Xis run.
  607. X.IP \-s
  608. Xprint out scores
  609. X.SH CONTROL OPTIONS
  610. X.B conqrun
  611. X[-maxp -dDIR ]
  612. X.IP \-a     
  613. Xadd new player    
  614. X.IP \-m     
  615. Xmake a world
  616. X.IP \-p     
  617. Xprint a map to standard output.    
  618. X.IP \-x     
  619. Xexecute program
  620. X.IP "\-d DIR  "
  621. Xrun on data in directory DIR
  622. XIt is suggested that each player set up an alias for their game & nation.
  623. XMy alias, for example, is
  624. X.br
  625. X.I conquer -nMordor -d/usr4/adb/games/conqlib2
  626. X.SH CURSOR MOVEMENT
  627. X.nf
  628. Xh: move west
  629. Xy: move north-west
  630. Xk: move north
  631. Xu: move north-east
  632. Xl: move east
  633. Xn: move south-east
  634. Xj: move south
  635. Xb: move south west
  636. XJ: scroll south
  637. XK: scroll north
  638. XL: scroll east
  639. XH: scroll west
  640. X.fi
  641. X.SH COMMANDS
  642. X.TP 
  643. X\'a\':
  644. X.B army report:
  645. XGives army details & permits changing army status, merging 2 armies,
  646. Xsplitting armies, and disbanding armies.
  647. X.TP 
  648. X\'c\':
  649. X.B administration:
  650. XReport on nation status and then change name, password,
  651. Xadd to combat bonus, or (if god) destroy a nation.
  652. X.TP
  653. X\'d\':
  654. X.B change display:
  655. XChange display mode.  Numbers in gold screens... are
  656. Xrelative values of the materials.  People are displayed
  657. Xby hundreds as arabic digits and by thousands with roman
  658. Xnumerals.
  659. X.TP
  660. X\'f\':
  661. X.B fleet report:
  662. XReport on the status of your fleets.
  663. X.TP
  664. X\'g\':
  665. X.B group report:
  666. XGives army details on current sector & permits changing army status,
  667. Xmerging 2 armies, splitting armies, and disbanding armies.
  668. X.TP
  669. X\'m\':
  670. X.B move unit:
  671. Xmove selected unit. The unit will stop when it runs out
  672. Xof move points or runs into an army larger than it.
  673. X.TP
  674. X\'p\':
  675. X.B pick item:
  676. Xallows you to select the next army or navy in the
  677. Xsector.  Other commands will operate on that unit.
  678. X.TP
  679. X\'r\':
  680. X.B redesignate:
  681. Xyou can change habitable sectors you own to other
  682. Xdesignations.  Cities require 500+ people & Capitols
  683. Xrequire cities.  God can redesignate anything.
  684. X.TP
  685. X\'s\':
  686. X.B score:
  687. Xprint out a screen showing the scores.
  688. X.TP
  689. X\'t\':
  690. X.B transport:
  691. Xunload or load a fleet with soldiers or civilians.
  692. X.bp
  693. X.TP
  694. X\'w\':
  695. X.B wizardry:
  696. Xyou may cast spell to allow flight, increase battle
  697. Xperformance or summon monsters if you have the ability.
  698. X.TP
  699. X\'?\':
  700. X.B help screen:
  701. Xprint out help text
  702. X.TP
  703. X\'B\':
  704. X.B budget :
  705. XESTIMATE your nations budget statistics
  706. X.TP
  707. X\'C\':
  708. X.B construct:
  709. XIf you have cash, you can build fortifications and
  710. Xships in your cities.  Ships can only be built in cities
  711. Xlocated on the water.
  712. X.TP
  713. X\'D\':
  714. X.B draft:
  715. XYou may draft a quarter of the population of your
  716. Xcities (those with more than a certain percent of
  717. Xyour population in it) if you have the gold.  You
  718. Xneed 10 per man iron for this.
  719. X.TP
  720. X\'F\':
  721. X.B next fleet:
  722. XMove cursor to your next fleet
  723. X.TP
  724. X\'G\':
  725. X.B next army:
  726. XMove cursor to your next army
  727. X.TP
  728. X\'M\':
  729. X.B magic:
  730. XPrints your magic powers & offers you the option to
  731. Xpurchase more (cost doubles each power). Monster Power
  732. Xgives you the chance to take over NPC nations.
  733. X.TP
  734. X\'N\':
  735. X.B newspaper:
  736. XBriefs you on world happenings.  Note the News has 4 pages.
  737. X.TP
  738. X\'P\':
  739. X.B production:
  740. XESTIMATE your nations production statistics
  741. X.TP
  742. X\'S\':
  743. X.B diplomacy:
  744. XAlloy you to see and alter your diplomatic status.
  745. X.TP
  746. X\'Q\':
  747. X.B quit:
  748. XSave your move and quit the game.  Note there is no
  749. Xmeans supported to quit without saving your moves.
  750. X.TP
  751. X\'R\':
  752. X.B read mail:
  753. XRead mail messages
  754. X.TP
  755. X\'W\':
  756. X.B write mail:
  757. XWrite mail messages
  758. X.TP
  759. X\'Z\':
  760. X.B move people:
  761. XCivilians can move between two of your sectors at a cost
  762. Xof 50 per civilian.  Civilians move naturally in the update.
  763. X.SH FILES
  764. X/usr/games/lib/conquerdir/data    datafile for the running game
  765. X.SH BUGS
  766. XProbably lots, if you find any please mail them to adb@bucsf
  767. X.sp
  768. X1) Security is not as tight as it should be.  People might be able to alter
  769. Xthe data of others nations... this is cheating and unacceptable.  
  770. X.br
  771. X2) Naval battles do not work properly.
  772. X.br
  773. X3) NPC nations can not build navies or move over water.  God should be
  774. Xsure that all NPC nations have a minimum of 5 sectors to move to.
  775. X.br
  776. X4) No comments about the documentation...  It needs to be updated.
  777. END_OF_FILE
  778. if test 5174 -ne `wc -c <'man.pag'`; then
  779.     echo shar: \"'man.pag'\" unpacked with wrong size!
  780. fi
  781. # end of 'man.pag'
  782. fi
  783. if test -f 'sort.c' -a "${1}" != "-c" ; then 
  784.   echo shar: Will not clobber existing file \"'sort.c'\"
  785. else
  786. echo shar: Extracting \"'sort.c'\" \(7076 characters\)
  787. sed "s/^X//" >'sort.c' <<'END_OF_FILE'
  788. X/*
  789. X * sort.c
  790. X *
  791. X * Written by Adam Bryant as a replacement for 'sort'
  792. X * for use with the conquer program.  Note that it
  793. X * is initially written with this program in mind and
  794. X * will not have many features useful elsewhere.
  795. X *
  796. X * INITIAL FORMAT USES [YIELDS SAME RESULTS]:
  797. X *
  798. X *   standard in to standard out:
  799. X *          'cat foo | conqsort > foonew'
  800. X *   file input to standard output:
  801. X *          'conqsort foo > foonew'
  802. X *   file input to file output:
  803. X *          'conqsort foo foonew'
  804. X *
  805. X * OR MAY EVEN OVERWRITE INITIAL FILE VIA:
  806. X *
  807. X *          'conqsort infoo infoo'
  808. X *
  809. X * Design Notes:
  810. X *   - all of the file will have to be placed into memory;
  811. X *   - to allow for any line length, space will be malloced()
  812. X *      as it comes in.
  813. X *
  814. X * Initial Revision:        (adb@bucsf.bu.edu)
  815. X *    Tuesday March 21th, 1989 - Began the program at 23:26 EST
  816. X *      Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
  817. X */
  818. X
  819. X#include <stdio.h>
  820. X#include "header.h"
  821. X#ifndef HPUX
  822. X#include <sysexits.h>
  823. X#endif HPUX
  824. X#include <ctype.h>
  825. X
  826. X/* system definitions just in case */
  827. X#ifndef FALSE
  828. X#define FALSE (0)
  829. X#define TRUE  (1)
  830. X#endif
  831. X
  832. X/* check for system exit definitions */
  833. X#ifndef EX_OK
  834. X#define EX_OK             0   /* successful termination */
  835. X#define EX_USAGE          64  /* invalid command line format */
  836. X#define EX_NOINPUT        66  /* could not open input file */
  837. X#define EX_SOFTWARE       70  /* software error; couldn't malloc */
  838. X#define EX_CANTCREAT      73  /* could not create output file */
  839. X#endif
  840. X
  841. X/* number of characters to compare by default */
  842. X#define DEFAULT_COMP 2
  843. X#define MAX_STR      200
  844. X
  845. X/* structure for holding a line of information */
  846. Xtypedef struct holder {
  847. X    char *line;
  848. X    struct holder *next;
  849. X} L_DATA, *L_PTR;
  850. X
  851. X/* pointer to head of list of lines */
  852. XL_PTR head;
  853. X
  854. X/* usage string */
  855. Xstatic char usage[]="Usage: %s [-num -h] [infile] [outfile]\n\
  856. X    -h        display this screen\n\
  857. X    -i        treat upper and lower case characters as equivalent\n\
  858. X    -num        Sort on first num characters\n";
  859. X
  860. X/* number of characters for comparison */
  861. Xint compnum=DEFAULT_COMP;
  862. X
  863. X/* flag for folding upper and lowercase characters */
  864. Xint iflag=FALSE;
  865. X
  866. X/* file pointers to infile and outfile */
  867. XFILE *infile=stdin, *outfile=stdout;
  868. X
  869. X/* macros */
  870. X#define UPPER(x) ((islower(x))?(toupper(x)):(x))
  871. X
  872. Xint
  873. Xmain(argc, argv)
  874. X    int argc;
  875. X    char *argv[];
  876. X{
  877. X    /* declare temporary variables and functions */
  878. X    int i,j,num_args=0,l,innum=0,outnum=0;
  879. X    FILE *fopen();
  880. X    int get_line();
  881. X    void place(), send_out();
  882. X
  883. X    /* input string */
  884. X    char data[MAX_STR];
  885. X
  886. X    /* parse command line arguments */
  887. X    for (i=1; i<argc; i++) {
  888. X
  889. X        /* process non-switch statements */
  890. X        if (argv[i][0]!='-') {
  891. X            num_args++;
  892. X            switch(num_args) {
  893. X               case 1:
  894. X                /* do not open unless arguments are valid */
  895. X                innum=i;
  896. X                break;
  897. X               case 2:
  898. X                /* do not open unless arguments are valid */
  899. X                outnum=i;
  900. X                break;
  901. X               default:
  902. X                fprintf(stderr,"%s: Too many parameters\n",argv[0]);
  903. X                fprintf(stderr,usage,argv[0]);
  904. X                exit(EX_USAGE);
  905. X                break;
  906. X            }
  907. X            continue;
  908. X        }
  909. X
  910. X        /* process switch statements */
  911. X        l = strlen(argv[i]);
  912. X        for (j=1; j<l; j++) {
  913. X            switch(argv[i][j]) {
  914. X               case 'h':
  915. X                fprintf(stderr,usage,argv[0]);
  916. X                exit(EX_OK);
  917. X                break;
  918. X               case 'i':
  919. X                iflag=TRUE;
  920. X                break;
  921. X               case '0':
  922. X               case '1':
  923. X               case '2':
  924. X               case '3':
  925. X               case '4':
  926. X               case '5':
  927. X               case '6':
  928. X               case '7':
  929. X               case '8':
  930. X               case '9':
  931. X                /* assign new comparison number */
  932. X                compnum=0;
  933. X                for(;j<l && argv[i][j]>='0' && argv[i][j]<='9';j++)
  934. X                {
  935. X                    compnum *= 10;
  936. X                    compnum += argv[i][j]-'0';
  937. X                }
  938. X                /* compensate for increment on exit */
  939. X                j--;
  940. X                break;
  941. X               default:
  942. X                fprintf(stderr,"%s: invalid option '%c' in <%s>\n",
  943. X                       argv[0],argv[i][j],argv[i]);
  944. X                fprintf(stderr,usage,argv[0]);
  945. X                exit(EX_USAGE);
  946. X                break;
  947. X            }
  948. X        }
  949. X    }
  950. X
  951. X    /* open input file now */
  952. X    if(innum!=0) {
  953. X        if((infile=fopen(argv[innum],"r"))==(FILE *)NULL) {
  954. X            fprintf(stderr,"%s: can't open file <%s> for input\n",
  955. X                   argv[0],argv[innum]);
  956. X            exit(EX_NOINPUT);
  957. X        }
  958. X    }
  959. X
  960. X    /* ======= main processing loop ======== */
  961. X
  962. X    while(!feof(infile)) {
  963. X
  964. X        /* remove any lines less than sort characters */
  965. X        if (get_line(data)>compnum) {
  966. X            place(data);
  967. X        }
  968. X
  969. X    }
  970. X
  971. X     /* ==== end of main processing loop ==== */
  972. X
  973. X    /* close input file if not stdin */
  974. X    if (infile!=stdin) {
  975. X        (void) fclose(infile);
  976. X    }
  977. X
  978. X    /* open output file now */
  979. X    if(outnum!=0) {
  980. X        if ((outfile=fopen(argv[outnum],"w"))==(FILE *)NULL) {
  981. X            fprintf(stderr,"%s: cannot open file <%s> for output\n",
  982. X                   argv[0],argv[outnum]);
  983. X            exit(EX_CANTCREAT);
  984. X        }
  985. X    }
  986. X
  987. X    send_out();
  988. X
  989. X    /* close output file if not stdout */
  990. X    if (outfile!=stdout) {
  991. X        (void) fclose(outfile);
  992. X    }
  993. X
  994. X    exit(EX_OK);
  995. X}
  996. X
  997. X/* routine to read all characters in until carriage returns */
  998. Xint
  999. Xget_line(data)
  1000. X    char data[];
  1001. X{
  1002. X    int in,ch;
  1003. X
  1004. X    /* discard exceptionally long lines */
  1005. X    for(in=0;!feof(infile)&&(in<MAX_STR-1)&&((ch=getc(infile))!='\n');)
  1006. X    {
  1007. X        /* copy valid input into data */
  1008. X        if((ch=='\t')||(ch==' ')||((ch>=' ')&&(ch<='~'))) {
  1009. X            data[in]=ch;
  1010. X            in++;
  1011. X        }
  1012. X    }
  1013. X    /* end string */
  1014. X    data[in]='\0';
  1015. X
  1016. X    return(in);
  1017. X}
  1018. X
  1019. X/* routine to output entire sorted file to outfile */
  1020. Xvoid
  1021. Xsend_out()
  1022. X{
  1023. X    L_PTR temp=head;
  1024. X
  1025. X    while (temp!=(L_PTR)NULL) {
  1026. X        fprintf(outfile,"%s\n",temp->line);
  1027. X        temp = temp->next;
  1028. X    }
  1029. X}
  1030. X
  1031. X/* routine to sort list as it comes in */
  1032. Xvoid
  1033. Xplace(data)
  1034. X    char data[];
  1035. X{
  1036. X    L_PTR temp, build_node();
  1037. X    int comp_line();
  1038. X
  1039. X    /* find location for placing input */
  1040. X    if(head==(L_PTR)NULL) {
  1041. X        /* begin list properly */
  1042. X        head = build_node(data,(L_PTR)NULL);
  1043. X    } else if (comp_line(head->line,data)==1) {
  1044. X        /* add to beginning of list */
  1045. X        head = build_node(data,head);
  1046. X    } else {
  1047. X        /* otherwise add in proper position */
  1048. X        temp=head;
  1049. X        while ((temp->next!=(L_PTR)NULL)
  1050. X        &&(comp_line(temp->next->line,data)!=1)) {
  1051. X            temp=temp->next;
  1052. X        }
  1053. X        temp->next = build_node(data,temp->next);
  1054. X    }
  1055. X}
  1056. X
  1057. X/* routine to compare two lines through N characters */
  1058. X/* where N is given by the variable compnum          */
  1059. X/*    returns:  0 on equal                           */
  1060. X/*             -1 on a preceding b                   */
  1061. X/*              1 on a following b                   */
  1062. Xint
  1063. Xcomp_line(a,b)
  1064. X    char *a,*b;
  1065. X{
  1066. X    int i;
  1067. X
  1068. X    for(i=0;i<compnum;i++) {
  1069. X        /* do checks */
  1070. X        if (iflag) {
  1071. X            if (UPPER(a[i])<UPPER(b[i])) return(-1);
  1072. X            if (UPPER(b[i])<UPPER(a[i])) return(1);
  1073. X        } else {
  1074. X            if (a[i]<b[i]) return(-1);
  1075. X            if (b[i]<a[i]) return(1);
  1076. X        }
  1077. X        if (a[i]=='\0') return(0);
  1078. X    }
  1079. X    return(0);
  1080. X}
  1081. X
  1082. X/* create L_DATA structure containing a line of data */
  1083. X/* and the next value set to the given location      */
  1084. XL_PTR
  1085. Xbuild_node(data, nptr)
  1086. X    char data[];
  1087. X    L_PTR nptr;
  1088. X{
  1089. X    L_PTR temp;
  1090. X    char *strcpy();
  1091. X
  1092. X    /* build the memory space */
  1093. X    if((temp=(L_PTR)malloc(sizeof(L_DATA)))==(L_PTR)NULL) {
  1094. X        fprintf(stderr,"Error in creating structure memory!\n");
  1095. X        exit(EX_SOFTWARE);
  1096. X    }
  1097. X    if((temp->line=(char *)malloc((strlen(data)+1)*sizeof(char)))==NULL) {
  1098. X        fprintf(stderr,"Error in creating data memory!\n");
  1099. X        exit(EX_SOFTWARE);
  1100. X    }
  1101. X
  1102. X    /* assign the values */
  1103. X    (void) strcpy(temp->line,data);
  1104. X    temp->next = nptr;
  1105. X    return(temp);
  1106. X}
  1107. X
  1108. END_OF_FILE
  1109. if test 7076 -ne `wc -c <'sort.c'`; then
  1110.     echo shar: \"'sort.c'\" unpacked with wrong size!
  1111. fi
  1112. # end of 'sort.c'
  1113. fi
  1114. if test -f 'txt3' -a "${1}" != "-c" ; then 
  1115.   echo shar: Will not clobber existing file \"'txt3'\"
  1116. else
  1117. echo shar: Extracting \"'txt3'\" \(7500 characters\)
  1118. sed "s/^X//" >'txt3' <<'END_OF_FILE'
  1119. X                              MAGIC POWERS
  1120. X
  1121. XMagic powers differentiate your nation from all the other nations in the
  1122. Xworld.  There are three types of powers - truly MAGICAL powers, which
  1123. Xusually involve summoning or spell use, CIVILIAN powers, which are related
  1124. Xto civilization and trade, and MILITARY powers, which measure your ability
  1125. Xto make war.  
  1126. X
  1127. XAll nations start with at least one power (based on race or class) and can 
  1128. Xpurchase additional powers by expending jewels.  On the Magic Screen ('M'), 
  1129. Xif you have enough jewels, you will be asked if you wish to buy a magic
  1130. Xpower.
  1131. XThe magic screen also permits you to see what powers you have, and to
  1132. Xtakeover ORC nations if you are an ORC nation with the appropriate powers.
  1133. XEND
  1134. X                            HOW TO GET MAGIC
  1135. X
  1136. XMagic powers cost jewels to obtain; the chance to obtain a power is based on 
  1137. Xyour nations magic ability.  The formulae for this is to take two to the 
  1138. Xpower of the sum of the number of powers you have from that type and half 
  1139. Xthe number of other powers times your base value:
  1140. X
  1141. Xjewel cost for civilian power = Base * 2**( #mgk/2 + #civ + #mil/2 )
  1142. X
  1143. X                             type of power desired
  1144. X         race         magical    civilian      military
  1145. X        elves -        XEMMAG        XECMAG          XEWMAG
  1146. X        dwarves -      XDMMAG        XDCMAG          XDWMAG
  1147. X        humans -       XHMMAG        XHCMAG          XHWMAG
  1148. X        orcs -         XOMMAG        XOCMAG          XOWMAG
  1149. X
  1150. Xfor example a human with 1 of each power wanting a magic power would pay
  1151. X                XHMMAG * 2**(1+1/2+1/2) = 4 *XHMMAG jewels
  1152. XEND
  1153. X                        COMBAT TYPE POWERS
  1154. X
  1155. XWARRIOR        +10% in combat. 1/2 Enlistment cost.
  1156. XCAPTAIN        +10% in combat. Can have PHALANX Units. Need WARRIOR power.
  1157. XWARLORD        +10% in combat. Can have LEGIONARY Units. Need CAPTAIN power.
  1158. XARCHER         Can get ARCHER units.
  1159. XCAVALRY        Can get LIGHT & HEAVY CAVALRY units.
  1160. XSAPPER         CATAPULT/SIEGE @ 1/2 price & 1/2 metal. 1/2 maint.
  1161. X               +10% against cities/forts/capitols.
  1162. XARMOR          With CAVALRY, can get KNIGHTS; Can Get ELITE Units,
  1163. X               -3 Move (4 Min), +20 Defense
  1164. XAVIAN          Use ROC and GRIFFON units.
  1165. X
  1166. XMONSTER POWERS The three powers below are monster powers for orc nations.
  1167. X               If using the Orc Takeover option, monster nations have a 
  1168. X               chance to takeover ORC NPCs for jewels.
  1169. XMINOR MONST    1 minor monster unit/spring. Can get ORCs. 1/2 spell point/turn
  1170. XAVERAGE MONST  1 avg monster unit/spring. Can get URUK HAI. 1 spell point/turn
  1171. XMAJOR MONST    1 major monster unit/spring. Can get TROLLs. 2 spell point/turn
  1172. XEND
  1173. X                        CIVILIAN TYPE POWERS
  1174. X
  1175. XDERVISH    Desert/ICE sectors => 1 move point, vegetation 6, +30% combat in
  1176. X           XDERVDESG redesignate desert/ice sectors.
  1177. XHIDDEN     Nobody can count troops in your armies on map.
  1178. XARCHITECT  Double strength forts, Double Town revenue.
  1179. XRELIGION   +2 repro to 10% limit.  excess adds +5% to defense. (Not ORCS).
  1180. XMINER      2x metal and jewel production.  Elves cant get.
  1181. XURBAN      +3% Birth Rate to 12% limit.  remainder gives + to move (roads)
  1182. XBREEDER    +3% Birth Rate (ORCS ONLY) (to 14% limit). -10% combat. (no urban)
  1183. X           remainder adds to movement.
  1184. XSTEEL      Additional 2x Metal Production for MINERS.
  1185. XNINJA      Can have Ninja units.  Spys show enemy troop/civilian strength
  1186. X           exactly (even voids).
  1187. XSAILOR     1/2 price naval units.  Can use marines.  Double ship speed.
  1188. X           sailor nations ships are immune to storms at sea.
  1189. XDEMOCRACY  +10% in combat (moralle) +1 Move +1 repro. +1 eatrate.  Also if you
  1190. X           don't watch your charity level, you will give too much to the poor.
  1191. XROADS      +4 to move if unit starts in your nation.
  1192. XSLAVER     you gain 25% of the populace of *any* sector you take over.
  1193. XEND
  1194. X                        MAGICAL TYPE POWERS
  1195. X
  1196. XTHE_VOID   Nobody can see your sectors/armies (they appear blank).
  1197. XKNOWALL    Know all troop strengths and see the whole map (except voids).
  1198. XDESTROYER  Vegetation in 3 sectors of Capitol = Desert.  Act as Dervish.
  1199. X           Note: you cant have both DESTROYER and DERVISH power.
  1200. XVAMPIRE    35% of troops killed become your zombies, -35% in all combat,
  1201. X           All infantry/militia become zombies.  Can't add to combat bonus.
  1202. X           Vampire Power causes all nations to go to jihad with you.
  1203. XSUMMON     gives 4 spell pts per turn... can summon monsters with them
  1204. X           Can also do spell casting.  100K Jewels and 1M gold gives
  1205. X           a 20% chance of gaining +1 spell point per turn.  Not Dwarves.
  1206. XWYZARD     Gives +3 spell points.  Must have SUMMON Power.
  1207. XSORCERER   Gives +3 spell points.  Must have SUMMON Power.
  1208. XEND
  1209. X                          SPELL CASTING
  1210. X
  1211. XIf a nation has magical spell points, that nation may cast a number of
  1212. Xuseful spells.
  1213. X
  1214. XThe current list of spells and their costs:
  1215. X
  1216. XSummon          -- must have SUMMON to cast this spell; cost is dependent
  1217. X                    on the monster summoned.  (see next page)
  1218. XFlight          -- give flight to a unit at a cost of 1 spell pt / 100 men
  1219. XEnhance Attack  -- 30% increase in attack at a cost of 1 spell pt / 300 men
  1220. XEnhance Defense -- 30% increase in defense at a cost of 1 spell pt / 300 men
  1221. X
  1222. X   All of the above spells except summoning have an effect area of one army
  1223. Xunit and a duration of one turn.  Flight and the Combat Enhancements each
  1224. Xcause the unit to lose one movement point due to the change in status.
  1225. XEND
  1226. X                        SUMMONED MONSTERS
  1227. X
  1228. XA monster unit represents one monster, but is the equivalent in combat of an
  1229. Xarmy of the given number of men.  When summoned, they appear in your Capitol,
  1230. Xand are yours to command until you disband them or can not afford to pay
  1231. Xtheir per/turn jewel cost *and* 5x that cost in gold.  Monsters may be
  1232. Xwounded in combat as can normal army units.  Wounded monsters have a percent
  1233. Xchance of dying based on the percent damage taken (a dragon (1000 men) taking
  1234. X200 equivalent men of damage has a 20% chance of dying).  Next turn, however
  1235. Xits strength will be fully restored (1000 men again).  A number of the
  1236. Xmonsters will also have the ability of flight.
  1237. X
  1238. XSpell points can accumulate from turn to turn, but there is a 25% chance
  1239. Xthat half your unused spell points disappear each turn... this gives you
  1240. Xsome incentive to use them.
  1241. XEND
  1242. X                        SUMMONED MONSTER TYPES
  1243. X
  1244. X           spell    combat                 jewels      power
  1245. X           points   bonus    move    men    turn       prerequisites
  1246. XSPIRIT        2       +0      x1      50     1000
  1247. XASSASSIN      2      +20      x1      50      400      NINJA
  1248. XEFREET        2      +10      x1.5    50      400      DERVISH
  1249. XGARGOYLE      2      +10      x1      75      450      MI_MONST
  1250. XWRAITH        2      +10      x1      75      450      VAMPIRE
  1251. XHERO          2       +0      x1     100      200      WARRIOR
  1252. XCENTAUR       2      +10      x1.5    50      200      CAVALRY
  1253. XGIANT         5       +0      x1     150     2100
  1254. XSUPERHERO     5      +15      x1     150      450      WARLORD
  1255. XMUMMY         5      +15      x1     150     1000      VAMPIRE
  1256. XELEMENTAL     5       +5      x1.5   175     1900      SORCERER
  1257. XMINOTAUR      5      +20      x1     150     2100      DESTROYER
  1258. XDEMON         10     +50      x1     500     6000      DESTROYER
  1259. XBALROG        10     +40      x1.5   500     6000      WIZARD & VAMPIRE
  1260. XDRAGON        15     +50      x2    1000    10000      MA_MONST & WIZARD
  1261. XEND
  1262. XDONE
  1263. END_OF_FILE
  1264. if test 7500 -ne `wc -c <'txt3'`; then
  1265.     echo shar: \"'txt3'\" unpacked with wrong size!
  1266. fi
  1267. # end of 'txt3'
  1268. fi
  1269. echo shar: End of archive 14 \(of 14\).
  1270. cp /dev/null ark14isdone
  1271. MISSING=""
  1272. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1273.     if test ! -f ark${I}isdone ; then
  1274.     MISSING="${MISSING} ${I}"
  1275.     fi
  1276. done
  1277. if test "${MISSING}" = "" ; then
  1278.     echo You have unpacked all 14 archives.
  1279.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1280. else
  1281.     echo You still need to unpack the following archives:
  1282.     echo "        " ${MISSING}
  1283. fi
  1284. ##  End of shell archive.
  1285. exit 0
  1286.